package com.itcam.reflect;

/**
 * @author : Cammy.Wu
 * Description : 
 */

public class test06 {

    public static void main(String[] args) throws ClassNotFoundException {

//        Son son = new Son();

         Class.forName("com.itcam.reflect.Son");

        System.out.println(Son.m);

        Son[] array = new Son[5]; // 只是开辟了空间，没有加载类

    }
}

class Father {
    static int b = 2;

    static {
        System.out.println("父类被加载");
    }
}

class Son extends Father {
    static {
        System.out.println("子类被加载");
        m = 300;
    }

    static int m = 100;
    static final int M = 1;
}